<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改账单每月统计')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-statistic-edit" th:object="${billMonthStatistic}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">账单归属年月：</label>
                <div class="col-sm-8">
                    <input name="statisticMonth" th:field="*{statisticMonth}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">月初金额：</label>
                <div class="col-sm-8">
                    <input name="beginningAmount" th:field="*{beginningAmount}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">每月收支金额：</label>
                <div class="col-sm-8">
                    <input name="amount" th:field="*{amount}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">月末金额：</label>
                <div class="col-sm-8">
                    <input name="endAmount" th:field="*{endAmount}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">剩余房贷金额：</label>
                <div class="col-sm-8">
                    <input name="housingLoanAmount" th:field="*{housingLoanAmount}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">其他贷款金额：</label>
                <div class="col-sm-8">
                    <input name="otherLoanAmount" th:field="*{otherLoanAmount}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <input name="description" th:field="*{description}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "bill/statistic";
        $("#form-statistic-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-statistic-edit').serialize());
            }
        }
    </script>
</body>
</html>